//
//  CTopBarView.h
//  HCHK_iphone
//
//  Created by yilong zhang on 12-1-13.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

#define TOPBAR_HEIGHT   51

//===================================================================================================================

@interface CTobBarItem : UIView

@property (nonatomic, assign) UIButton      *m_Btn;
@property (nonatomic, assign) UIImageView   *m_Bg;

@property (nonatomic, assign) id    m_Target;
@property (nonatomic, assign) SEL   m_Action;

-(id)initWithFrame:(CGRect)frame Image:(UIImage*)image ImSize:(CGSize)imsize;
-(void)AddTarget:(id)target Action:(SEL)action;
-(void)OnButtonDown:(UIButton*)sender;

@end

@protocol TopBarDelegate <NSObject>

@optional
-(void)DidTopBarBtnsClicked:(UIButton*)btn;

@end

@interface CTopBarView : UIView

@property (nonatomic, assign) id<TopBarDelegate>    delegate;

//@property (nonatomic, assign) UIImageView   *m_Bg;
//@property (nonatomic, assign) UILabel       *m_Log;
//@property (nonatomic, assign) UILabel       *m_Title;
//@property (nonatomic, assign) CTobBarItem   *m_RetBtn;
///@property (nonatomic, assign) CTobBarItem   *m_OptBtn;
//@property (nonatomic, assign) CTobBarItem   *m_HomeBtn;
//@property (nonatomic, assign) CTobBarItem   *m_Search;

-(void)AddItem:(UIButton*)button;
-(void)OnTopBarDown:(UIButton*)sender;

@end
